import { request } from "@/utils/service"
interface ISmsChannelConfig {
  id?: number
  channelId: number
  signature: string
  channelApiKey: string
  channelApiSecret: string
  remark: string
  channelCallbackUrl: string
  enable: boolean
}
interface ISmsChannel {
  id?: number
  channelName: string
  channelCode: string
  instruction: string
  enable: boolean
}
interface ISearchSmsChannelConfig extends ISmsChannelConfig {
  pageNum: number
  pageSize: number
}
export function getSmsChannelListApi() {
  return request({
    url: "system/sms/all",
    method: "get"
  })
}
export function getSmsChannelConfigListApi(params: ISearchSmsChannelConfig) {
  return request({
    url: "system/sms/config/list",
    method: "get",
    params
  })
}
export function createSmsChannelConfigApi(data: ISmsChannelConfig) {
  return request({
    url: "system/sms/config/create",
    method: "post",
    data
  })
}
export function updateSmsChannelConfigApi(data: ISmsChannelConfig) {
  return request({
    url: "system/sms/config/update",
    method: "put",
    data
  })
}
export function deleteSmsChannelConfigApi(id: number) {
  return request({
    url: "system/sms/config/" + id,
    method: "delete"
  })
}
